<template>
  <div class="LeftNext">
    <div class="top">
      <span class="LeftFont">投入情况 </span>
      <span style="width:57%"></span>
      <div class="garden">...</div>
    </div>
    <!-- tab 切换 -->
    <ul class="tabsbox">
      <li>
        <a @click="cur = 2" :class="{ active: cur == 2 }">专项</a>
      </li>
    </ul>
    <div>
      <div v-show="cur == 2">
        <!-- 进度条 -->
        <!-- ================================================= -->
        <div class="screen-content">
          <div class="icon-box">
            <span class="icon-item">已执行</span>
            <span class="icon-item">未执行</span>
          </div>
          <div class="regList">
            <div class="listContent" v-for="(item, index) in list" :key="index">
              <div class="Leftbar">{{ item.region }}</div>
              <div class="jindu">
                <p>
                  <span class="span" :style="'width:' + item.wancheng + '%'">
                  </span>
                </p>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import echarts from "echarts";
import $ from "jquery";
export default {
  data() {
    return {
      cur: 2,
      list: [
        { id: 1, region: "电网基建", wancheng: 79.08 },
        { id: 2, region: "电网小型基建", wancheng: 84.16 },
        { id: 3, region: "生产技改", wancheng: 93.74 },
        { id: 4, region: "生成辅助技改", wancheng: 85.56 },
        { id: 5, region: "生成大修", wancheng: 0 },
        { id: 6, region: "生成辅助大修", wancheng: 0 },
        { id: 7, region: "零星购置", wancheng: 90.0 },
        { id: 8, region: "市场营销", wancheng: 85.23 },
        { id: 9, region: "电网数字化", wancheng: 81.68 },
        { id: 10, region: "研究开发", wancheng: 0 },
        { id: 11, region: "教育培训", wancheng: 0 },
        { id: 12, region: "股权投资", wancheng: 73.68 },
        { id: 13, region: "管理资讯", wancheng: 0 },
        { id: 14, region: "产业基建", wancheng: 0 },
        { id: 15, region: "产业技改", wancheng: 0 },
        { id: 16, region: "产业大修", wancheng: 0 },
      ],
    };
  },
};
</script>

<style lang="scss" scoped>
.LeftNext {
  width: 510px;
  height: 610px;
  background: #fff;
  // box-shadow: 0px 0px 20px gainsboro;
  border: solid 1px #ccc;
}
.top {
  width: 100%;
  height: 30px;
  border-bottom: 1px solid gainsboro;
  display: flex;
  justify-content: space-around;

  .LeftFont {
    margin-top: 8px;
    height: 14px;
    line-height: 14px;
    padding-left: 10px;
    border-left: 3px solid #277f7b;
    font-size: 14px;
    font-weight: 500px;
    font-family: MicrosoftYaHei;
    color: #000000;
  }
}
.tabsbox {
  //   overflow: hidden;
  //   border: 1px solid #fff;
}
.tabsbox li {
  cursor: pointer;
  list-style: none;
  float: left;
  font-size: 14px;
  min-width: 84px;
  height: 24px;
  background: #fff;
  margin-left: -15px;
  //   border: 1px solid gainsboro;
}
.tabsbox li a {
  cursor: pointer;
  width: 58px;
  height: 24px;
  text-align: center;
  line-height: 24px;
  border: 1px solid #dddddd;
  color: #000000;
  padding: 5px 29px;
  border-bottom: 1.5px solid transparent;
}
.tabsbox li a.active {
  caret-color: transparent;
  cursor: pointer;
  color: #fff;
  background: #277f7b;
}
.industry {
  display: flex;
  // margin-top: 2px;
  // justify-content: center;
  // margin-top: 20px;
  z-index: 99;
}
.defray {
  margin-top: -100px;
}

// ===========================================================
.icon-box {
  width: 80%;
  height: 50px;
  line-height: 50px;
  text-align: right;
  float: right;
  margin-top: -40px;
}
.icon-item {
  margin-left: -18px;
  padding-left: 2px;
  margin-right: 48px;
  display: inline-flex;
  align-items: center;
  text-indent: 5px;
  font-size: 12px;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.45);
  // line-height: 18px;
  &:before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #36cbcb;
  }
  &:first-child::before {
    background-color: #3aa0ff;
  }
}

/* 设置滚动条的样式 */
.regList::-webkit-scrollbar {
  width: 8px;
}
/* 滚动槽 */
.regList::-webkit-scrollbar-track {
  -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.3);
  border-radius: 10px;
}
/* 滚动条滑块 */
.regList::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.1);
  -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.5);
}
// .regList::-webkit-scrollbar-thumb:window-inactive {
//   background: rgba(255, 0, 0, 0.4);
// }
.regList {
  margin-left: 5%;
  width: 92%;
  height: 508px;
  padding: 3px 1px;
  overflow-x: hidden;
  overflow-y: scroll;
  .listContent {
    display: flex;
    justify-content: space-between;
    .Leftbar {
      //   float: left;
      width: 121px;
      height: 15px;
      text-align: right;
      font-size: 14px;
      font-family: MicrosoftYaHei;
      color: #595959;
      line-height: 15px;
      padding-top: 17px;
    }
    .jindu {
      width: 316px;
      float: left;
      p {
        width: 95%;
        height: 15px;
        background: #3aa0ff;
        position: relative;
        span {
          display: inline-block;
          height: 15px;
          background: #36cbcb;
          position: absolute;
          left: 0;
          top: 0;
        }
      }
    }
  }
}
// .regList::-webkit-scrollbar {
//   display: none; /* Chrome Safari */
// }
.garden {
  caret-color: transparent;
  line-height: 7px;
  text-align: center;
  font-size: 15px;
  font-weight: bolder;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: solid 1px #ccc;
  position: absolute;
  right: 24px;
  top: 6px;
  color: #d3d3d3;
  //   background: #adadad;
  cursor: pointer;
  // z-index: 9999
}
</style>
